package com.example.beans;

import java.util.List;
import java.util.Set;

public class MusicBox {

    private List<String> songs;
    private Set<String> artists;
    private String boxName;

    public MusicBox(List<String> songs, Set<String> artists) {
        this.songs = songs;
        this.artists = artists;
    }

    public String getBoxName() {
        return boxName;
    }

    public void setBoxName(String boxName) {
        this.boxName = boxName;
    }

    public void showBox(){
        System.out.println("音乐盒名称：" + boxName);
        System.out.println("音乐盒中的歌曲：");
        songs.forEach(song -> System.out.println(song));
        System.out.println("音乐盒中的艺术家：");
        artists.forEach(artist -> System.out.println(artist));
    }
}
